/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: eventmesh-cloudevents.proto

package org.apache.eventmesh.common.protocol.grpc.cloudevents;

public interface CloudEventOrBuilder extends
    // @@protoc_insertion_point(interface_extends:org.apache.eventmesh.cloudevents.v1.CloudEvent)
    com.google.protobuf.MessageOrBuilder {

  /**
   * <pre>
   * Required Attributes
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The id.
   */
  String getId();
  /**
   * <pre>
   * Required Attributes
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The bytes for id.
   */
  com.google.protobuf.ByteString
      getIdBytes();

  /**
   * <pre>
   * URI-reference
   * </pre>
   *
   * <code>string source = 2;</code>
   * @return The source.
   */
  String getSource();
  /**
   * <pre>
   * URI-reference
   * </pre>
   *
   * <code>string source = 2;</code>
   * @return The bytes for source.
   */
  com.google.protobuf.ByteString
      getSourceBytes();

  /**
   * <code>string spec_version = 3;</code>
   * @return The specVersion.
   */
  String getSpecVersion();
  /**
   * <code>string spec_version = 3;</code>
   * @return The bytes for specVersion.
   */
  com.google.protobuf.ByteString
      getSpecVersionBytes();

  /**
   * <code>string type = 4;</code>
   * @return The type.
   */
  String getType();
  /**
   * <code>string type = 4;</code>
   * @return The bytes for type.
   */
  com.google.protobuf.ByteString
      getTypeBytes();

  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  int getAttributesCount();
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  boolean containsAttributes(
      String key);
  /**
   * Use {@link #getAttributesMap()} instead.
   */
  @Deprecated
  java.util.Map<String, CloudEvent.CloudEventAttributeValue>
  getAttributes();
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */
  java.util.Map<String, CloudEvent.CloudEventAttributeValue>
  getAttributesMap();
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */

  /* nullable */
CloudEvent.CloudEventAttributeValue getAttributesOrDefault(
      String key,
      /* nullable */
CloudEvent.CloudEventAttributeValue defaultValue);
  /**
   * <pre>
   * Optional &amp; Extension Attributes
   * </pre>
   *
   * <code>map&lt;string, .org.apache.eventmesh.cloudevents.v1.CloudEvent.CloudEventAttributeValue&gt; attributes = 5;</code>
   */

  CloudEvent.CloudEventAttributeValue getAttributesOrThrow(
      String key);

  /**
   * <code>bytes binary_data = 6;</code>
   * @return Whether the binaryData field is set.
   */
  boolean hasBinaryData();
  /**
   * <code>bytes binary_data = 6;</code>
   * @return The binaryData.
   */
  com.google.protobuf.ByteString getBinaryData();

  /**
   * <code>string text_data = 7;</code>
   * @return Whether the textData field is set.
   */
  boolean hasTextData();
  /**
   * <code>string text_data = 7;</code>
   * @return The textData.
   */
  String getTextData();
  /**
   * <code>string text_data = 7;</code>
   * @return The bytes for textData.
   */
  com.google.protobuf.ByteString
      getTextDataBytes();

  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   * @return Whether the protoData field is set.
   */
  boolean hasProtoData();
  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   * @return The protoData.
   */
  com.google.protobuf.Any getProtoData();
  /**
   * <code>.google.protobuf.Any proto_data = 8;</code>
   */
  com.google.protobuf.AnyOrBuilder getProtoDataOrBuilder();

  public CloudEvent.DataCase getDataCase();
}
